

package com.kun.portal.webframe.po;

        import com.fasterxml.jackson.annotation.JsonFormat;
        import com.fasterxml.jackson.annotation.JsonIdentityInfo;
        import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
        import com.fasterxml.jackson.annotation.ObjectIdGenerators;

        import com.kun.portal.webframe.util.LazyIgnore;
        import com.kun.portal.webframe.util.Loaded;
        import org.hibernate.annotations.DynamicUpdate;
        import org.hibernate.annotations.GenericGenerator;
        import org.hibernate.collection.spi.PersistentCollection;
        import org.springframework.context.annotation.Lazy;
        import org.springframework.format.annotation.DateTimeFormat;

        import javax.persistence.*;
        import java.util.Date;
        import java.util.Set;

/**
 * Created by Administrator on 2018/7/5.
 */
@Entity
@Table(
        name = "fbo_loginLog"
)
@DynamicUpdate

public class LoginLogPo {
    @Id
    @GeneratedValue(
            generator = "id"
    )
    @GenericGenerator(
            name = "id",
            strategy = "uuid"
    )
    @Column(
            name = "id",
            length = 32,
            nullable = false
    )
    private String  id;

    @Column(
            name = "ip",
            length = 100

    )
    private String  ip;


    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="Asia/Shanghai")
    @Temporal(TemporalType.TIMESTAMP)
    @Column(
            name = "login_date"

    )
    private Date loginDate;



    @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.EAGER)
    @JoinColumn(name = "user_id", referencedColumnName = "user_id",insertable = true,updatable = true)

    private FwUserPo  fwUserPo;

    public Date getLoginDate() {
        return loginDate;
    }

    public void setLoginDate(Date loginDate) {
        this.loginDate = loginDate;
    }

    public FwUserPo getFwUserPo() {
        return fwUserPo;
    }

    public void setFwUserPo(FwUserPo fwUserPo) {
        this.fwUserPo = fwUserPo;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }
}
